package com.zxy.service;


import com.zxy.dao.ProductDao;

import com.zxy.model.Product;
import com.zxy.model.ProductQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService {

    @Autowired
    private ProductDao productDao;
    public List<Product> select(ProductQuery query) {
        return productDao.select(query);
    }

    public int insert(Product product) {
        return productDao.insert(product);
    }

    public int update(Product product) {
        return productDao.update(product);
    }

    public int delete(Integer id) {
        return productDao.delete(id);
    }
}
